package cn.dnui_zjs008.dnuifood_madp003.model;

import cn.dnui_zjs008.dnuifood_madp003.iface.ShopIface;
import cn.dnui_zjs008.dnuifood_madp003.listener.onRetrofitListener;
import cn.dnui_zjs008.dnuifood_madp003.service.ShopService;
import retrofit2.Call;

public class ShopModel extends BaseModel
        implements ShopIface {
    private ShopService service;
    public ShopModel(){
        //super();
        service = retrofit.create(ShopService.class);
    }
    @Override
    public void getAllShops(onRetrofitListener listener) {
        Call call = service.getAllShops();
        bindCallback(call,listener,1);
    }

    @Override
    public void getFoodByShop(String shop_id, onRetrofitListener listener) {
        Call call = service.getFoodByShop(shop_id);
        bindCallback(call,listener,2);
    }
}
